import java.util.ArrayList;
import java.util.Date;
import java.util.List;



public class User {
	private String username;
	private String password;
	private Date birthdate;
	private String userType;
	private List<Review> userReviews;
	
	public User(String theUsername, String thePassword) {
		setUsername(theUsername);
		setPassword(thePassword);
		birthdate = null;
		userType = "";
		userReviews = new ArrayList<Review>();
	}
	public User(String theUsername, String thePassword, Date theBirthdate) {
		this(theUsername, thePassword);
		setBirthdate(theBirthdate);
	}
	
	public User(String theUsername, String thePassword, Date theBirthdate, String theUserType) {
		this(theUsername, thePassword, theBirthdate);
		setUserType(theUserType);
//		if(theUserType.contains("A")) {
//			Actor a = new Actor(theUsername);
//		}
	}
	public User(String theUsername, String thePassword, String theUserType) {
		this(theUsername, thePassword, null, theUserType);
	}
	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}
	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the birthdate
	 */
	public Date getBirthdate() {
		return birthdate;
	}
	/**
	 * @param birthdate the birthdate to set
	 */
	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}
	/**
	 * @return the userType
	 */
	public String getUserType() {
		return userType;
	}
	/**
	 * @param userType the userType to set
	 */
	public void setUserType(String userType) {
		this.userType = userType;
	}
	
	public void addReview(Review r)
	{
		userReviews.add(r);
		System.out.println("Reviews size1: " + userReviews.size());
	}
	
	public List<Review> getUserReviews()
	{
		System.out.println("Reviews size2: " + userReviews.size());
		return userReviews;
	}
	
}
